﻿Imports Microsoft.Office.Interop.Outlook

Public Class SharedMethods
    Public Shared Sub SetCurrentFolder(ByVal app As Application, ByVal folderToSet As Outlook.MAPIFolder)
       Dim expl As Outlook.Explorer = app.ActiveExplorer
        expl.CurrentFolder = folderToSet
    End Sub


    Public Shared Sub ControlSetFocus(ByVal ctrl As Control)
        If ctrl.CanFocus Then
            ctrl.Focus()
        End If
    End Sub

    Public Shared Sub openDistripostInfofiche()
        Process.Start(ConfigurationHelper.DistripostInfoFicheLocation)

        'Dim excel As Microsoft.Office.Interop.Excel.Application

        'Dim wb As Microsoft.Office.Interop.Excel.Workbook

        'excel = New Microsoft.Office.Interop.Excel.Application
        'Dim excelfile As String = ConfigurationHelper.DistripostInfoFicheLocation

        'If excelfile.Equals(String.Empty) Then
        '    MessageBox.Show("Gelieve de infofiche te selecteren bij de opties.")
        'Else
        '    wb = excel.Workbooks.Open(ConfigurationHelper.DistripostInfoFicheLocation)

        '    excel.Visible = True
        '    wb.Activate()
        'End If
    End Sub
End Class
